package 进制转换.七进制数;

public class qjzs {
    public static void main(String[] args) {
        System.out.println(convertToBase7(-7));
    }
    public static String convertToBase7(int num) {
//        StringBuilder stringBuilder = new StringBuilder();
//        while (num != 0){
//            stringBuilder.append(num % 7);
//            num /= 7;
//        }
//        return stringBuilder.reverse().toString();
        return Integer.toString(num, 7);
    }
}
